<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.1">

    <xsl:attribute-set name="td">
        <xsl:attribute name="padding">3pt</xsl:attribute>
        <xsl:attribute name="border-top-style">inset</xsl:attribute>
        <xsl:attribute name="border-bottom-style">inset</xsl:attribute>
        <xsl:attribute name="border-left-style">inset</xsl:attribute>
        <xsl:attribute name="border-right-style">inset</xsl:attribute>
    </xsl:attribute-set>
    <xsl:attribute-set name="header">
        <xsl:attribute name="font-weight">bold</xsl:attribute>
        <xsl:attribute name="font-size">14pt</xsl:attribute>
        <xsl:attribute name="font-style">italic</xsl:attribute>
        <xsl:attribute name="border-bottom-style">outset</xsl:attribute>
        <xsl:attribute name="margin-left">25mm</xsl:attribute>
        <xsl:attribute name="space-before">10mm</xsl:attribute>
        <xsl:attribute name="margin-right">25mm</xsl:attribute>
    </xsl:attribute-set>
    <xsl:attribute-set name="content">
        <xsl:attribute name="font-size">10pt</xsl:attribute>
        <xsl:attribute name="margin-left">25mm</xsl:attribute>
        <xsl:attribute name="space-before">2mm</xsl:attribute>
        <xsl:attribute name="margin-right">25mm</xsl:attribute>
    </xsl:attribute-set>
    <xsl:attribute-set name="linebreak">
        <xsl:attribute name="border-bottom-style">dotted</xsl:attribute>
        <xsl:attribute name="margin-left">35mm</xsl:attribute>
        <xsl:attribute name="margin-right">35mm</xsl:attribute>
    </xsl:attribute-set>

    <xsl:template match="/">
        <fo:root>
            <fo:layout-master-set>
                <fo:simple-page-master master-name="sean" page-height="280mm" page-width="216mm">
	                <fo:region-body 
	                               region-name="xsl-region-body"
	                               margin-top="10mm" margin-bottom="10mm"/>
                    <fo:region-before 
                                     region-name="xsl-region-before"
                                     extent="10mm"/>
                    <fo:region-after 
                                    region-name="xsl-region-after"
                                    extent="10mm"/>
                </fo:simple-page-master>
            </fo:layout-master-set>
            <xsl:apply-templates/>
        </fo:root>
    </xsl:template>

    <xsl:template match="resume">
        <fo:page-sequence master-reference="sean">
            <fo:static-content flow-name="xsl-region-before">
            <!-- **************** HEADER ****************** -->
		          <fo:block
		              font-family="serif"
		              font-size="24pt"
		              text-align="center"
		              font-weight="bold"
		              font-style="italic"
		              space-before="10mm"
		              space-after="20mm">
		                  Resume
		          </fo:block>
            </fo:static-content>

            <fo:static-content flow-name="xsl-region-after">
		          <fo:block>
		          </fo:block>
            </fo:static-content>

            <fo:flow flow-name="xsl-region-body">
            <!-- **************** Contact Info ****************** -->
                <fo:block
                      font-family="serif"
                      font-size="12pt">
                        <fo:table table-layout="fixed" width="100%" 
                                  text-align="left">
                            <fo:table-column column-width="25mm"/>
                            <fo:table-column column-width="83mm"/>
                            <fo:table-column column-width="83mm"/>
                            <fo:table-column column-width="25mm"/>       
                      <fo:table-body>
                        <fo:table-row>
                            <fo:table-cell>
                                <fo:block>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell xsl:use-attribute-sets="td">             
                                <fo:block>Name: <xsl:value-of select="fName"/></fo:block>
                            </fo:table-cell>
                            <fo:table-cell xsl:use-attribute-sets="td">
                                <fo:block>Phone: <xsl:value-of select="phone"/></fo:block>
                            </fo:table-cell>
                            <fo:table-cell>
                                <fo:block>
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                          <fo:table-row>
                          <fo:table-cell>
                                <fo:block>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell xsl:use-attribute-sets="td">
                                <fo:block>Address: <xsl:value-of select="address"/></fo:block>
                            </fo:table-cell>
                            <fo:table-cell xsl:use-attribute-sets="td">
                                <fo:block>E-mail: <xsl:value-of select="email"/></fo:block>
                            </fo:table-cell>
                            <fo:table-cell>
                                <fo:block>
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                      </fo:table-body>
                      </fo:table>                       
                  </fo:block>
                  
                  <!-- ********* Summary of Qualifications ******* -->
                  <fo:block xsl:use-attribute-sets="header">
                        Summary of Qualifications:
                  </fo:block>
                  <fo:block xsl:use-attribute-sets="content">
                        <xsl:value-of select="soq"/>
                  </fo:block>
                  
                  <!-- **************** Experience ****************** -->
                  <fo:block xsl:use-attribute-sets="header">
                        Experience:
                  </fo:block>
                  
                  <!-- **************** Company 1 ****************** -->
                  <fo:block>
                    <fo:table table-layout="fixed" width="100%" text-align="left">
                            <fo:table-column column-width="25mm"/>
                            <fo:table-column column-width="83mm"/>
                            <fo:table-column column-width="83mm"/>
                            <fo:table-column column-width="25mm"/>       
                      <fo:table-body>
                        <fo:table-row>
                            <fo:table-cell>
                                <fo:block>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell padding="3pt">
                                <fo:block>
                                        <xsl:value-of select="company"/>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell padding="3pt">
                                <fo:block>
                                        <xsl:value-of select="workDate"/>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell>
                                <fo:block>
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                        <fo:table-row>
                            <fo:table-cell>
                                <fo:block>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell number-columns-spanned="2" padding="3pt">
                                <fo:block>
                                        <xsl:value-of select="desc"/>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell>
                                <fo:block>
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                      </fo:table-body>
                    </fo:table>
                  </fo:block>
                  
                  <!-- **************** Linebreak ****************** -->
                   <fo:block xsl:use-attribute-sets="linebreak"/>
                  
                  <!-- **************** Company 2 ****************** -->
                  <fo:block>
                    <fo:table table-layout="fixed" width="100%" text-align="left">
                            <fo:table-column column-width="25mm"/>
                            <fo:table-column column-width="83mm"/>
                            <fo:table-column column-width="83mm"/>
                            <fo:table-column column-width="25mm"/>       
                      <fo:table-body>
                        <fo:table-row>
                            <fo:table-cell>
                                <fo:block>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell padding="3pt">
                                <fo:block>
                                        <xsl:value-of select="company2"/>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell padding="3pt">
                                <fo:block>
                                        <xsl:value-of select="workDate2"/>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell>
                                <fo:block>
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                        <fo:table-row>
                            <fo:table-cell>
                                <fo:block>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell number-columns-spanned="2" padding="3pt">
                                <fo:block>
                                        <xsl:value-of select="desc2"/>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell>
                                <fo:block>
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                      </fo:table-body>
                    </fo:table>
                  </fo:block>  
                  
                  <!-- **************** Education ****************** -->
                  <fo:block xsl:use-attribute-sets="header">
                        Education:
                  </fo:block> 
                  
                  <!-- **************** School ****************** -->
                  <fo:block>
                    <fo:table table-layout="fixed" width="100%" text-align="left">
                            <fo:table-column column-width="25mm"/>
                            <fo:table-column column-width="83mm"/>
                            <fo:table-column column-width="83mm"/>
                            <fo:table-column column-width="25mm"/>       
                      <fo:table-body>
                        <fo:table-row>
                            <fo:table-cell>
                                <fo:block>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell padding="3pt">
                                <fo:block>
                                        <xsl:value-of select="school"/>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell padding="3pt">
                                <fo:block>
                                        <xsl:value-of select="studyDate"/>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell>
                                <fo:block>
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                        <fo:table-row>
                            <fo:table-cell>
                                <fo:block>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell number-columns-spanned="2" padding="3pt">
                                <fo:block>
                                        <xsl:value-of select="awards"/>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell>
                                <fo:block>
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                      </fo:table-body>
                    </fo:table>
                  </fo:block>
                  
                  <!-- **************** Linebreak ****************** -->
                   <fo:block xsl:use-attribute-sets="linebreak">
                   </fo:block>
                   
                  <!-- **************** School 2 ****************** -->
                  <fo:block>
                    <fo:table table-layout="fixed" width="100%" text-align="left">
                            <fo:table-column column-width="25mm"/>
                            <fo:table-column column-width="83mm"/>
                            <fo:table-column column-width="83mm"/>
                            <fo:table-column column-width="25mm"/>       
                      <fo:table-body>
                        <fo:table-row>
                            <fo:table-cell>
                                <fo:block>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell padding="3pt">
                                <fo:block>
                                        <xsl:value-of select="school2"/>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell padding="3pt">
                                <fo:block>
                                        <xsl:value-of select="studyDate2"/>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell>
                                <fo:block>
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                        <fo:table-row>
                            <fo:table-cell>
                                <fo:block>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell number-columns-spanned="2" padding="3pt">
                                <fo:block>
                                        <xsl:value-of select="awards2"/>
                                </fo:block>
                            </fo:table-cell>
                            <fo:table-cell>
                                <fo:block>
                                </fo:block>
                            </fo:table-cell>
                        </fo:table-row>
                      </fo:table-body>
                    </fo:table>
                  </fo:block>
                  
                  <!-- **************** References ****************** -->
                  <fo:block xsl:use-attribute-sets="header">
                        References:
                  </fo:block>
                  
                  <!-- **************** list of refs **************** -->
                  <fo:block>
                    <fo:table table-layout="fixed" width="100%" text-align="left">
                            <fo:table-column column-width="25mm"/>
                            <fo:table-column column-width="166mm"/>
                            <fo:table-column column-width="25mm"/>
                        <fo:table-body>
                            <fo:table-row>
                                <fo:table-cell>
                                    <fo:block>
                                    </fo:block>
                                </fo:table-cell>
                                <fo:table-cell padding="3pt">
                                    <fo:block>
                                        1. <xsl:value-of select="refName1"/> -- <xsl:value-of select="refPhone1"/>
                                    </fo:block>
                                </fo:table-cell>
                                <fo:table-cell>
                                    <fo:block>
                                    </fo:block>
                                </fo:table-cell>
                            </fo:table-row>
                            <fo:table-row>
                                <fo:table-cell>
                                    <fo:block>
                                    </fo:block>
                                </fo:table-cell>
                                <fo:table-cell padding="3pt">
                                    <fo:block>
                                        2. <xsl:value-of select="refName2"/> -- <xsl:value-of select="refPhone2"/>
                                    </fo:block>
                                </fo:table-cell>
                                <fo:table-cell>
                                    <fo:block>
                                    </fo:block>
                                </fo:table-cell>
                            </fo:table-row>
                            <fo:table-row>
                                <fo:table-cell>
                                    <fo:block>
                                    </fo:block>
                                </fo:table-cell>
                                <fo:table-cell padding="3pt">
                                    <fo:block>
                                        3. <xsl:value-of select="refName3"/> -- <xsl:value-of select="refPhone3"/>
                                    </fo:block>
                                </fo:table-cell>
                                <fo:table-cell>
                                    <fo:block>
                                    </fo:block>
                                </fo:table-cell>
                            </fo:table-row>
                        </fo:table-body>
                    </fo:table>
                  </fo:block>
                  
            </fo:flow>
        </fo:page-sequence>
    </xsl:template>

</xsl:stylesheet>
